<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
</head>
<body>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/4.0.1/socket.io.js"></script>
    <script type="text/javascript" charset="utf-8">
        const socket = io('http://localhost:8080');
        socket.on('message',function(message){
            console.log(message);
        });
    </script>
</body>
</html>